package com.crane.oss.job;


import com.crane.oss.school.dao.StudentDao;
import com.crane.oss.school.service.ClassesInfoService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class SchoolStartOrEndJob {

    @Resource
    protected ClassesInfoService classesInfoService;

    @Scheduled(cron = "0 0 2 * * ?")
    public void  updateClassGrade(){
        classesInfoService.updateClassGrade();
    }


    @Scheduled(cron = "0 0 2 * * ?")
    public void  updateClassOver(){
        classesInfoService.updateClassOver();
    }
}
